<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <input type="file" id="inp" name="点击我吧">
</body>
<script>
  "use strict";
  document.getElementById("inp").addEventListener("change", (e) => {
    let file = e.target.files[0];
    let reader = new FileReader();
    // reader.readAsDataURL(file);
    reader.readAsArrayBuffer(file);
    reader.addEventListener("load", (e) => {
      let arrAyBuffer = e.target.result;
      let uint8Array = new Uint8Array(arrAyBuffer);
      console.log(arrAyBuffer);
    });
  });
</script>

</html>